package legumes.client.evt.store;

import legumes.shared.domain.PlaceDelivery;
import legumes.shared.domain.Store;

import com.google.gwt.event.shared.GwtEvent;

public class PlaceDeliverySelectionChangedEvent extends GwtEvent<PlaceDeliverySelectionChangedEventHandler> {

	public static Type<PlaceDeliverySelectionChangedEventHandler> TYPE = new Type<PlaceDeliverySelectionChangedEventHandler>();
	
	private Store store;
	private PlaceDelivery pl;
	
	public PlaceDeliverySelectionChangedEvent(Store store_, PlaceDelivery pl_) {
		store = store_;
		pl = pl_;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<PlaceDeliverySelectionChangedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(PlaceDeliverySelectionChangedEventHandler handler) {
		handler.onStoreSelectionChanged(this);
	}

	public Store getStore() {
		return store;
	}

	public PlaceDelivery getPlaceDelivery(){
		return pl;
	}

}
